<?php $this -> load -> view('adminx/header'); ?>
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<?php $this -> load -> view('adminx/mune'); ?>
	<!-- END SIDEBAR -->
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<!-- /.modal -->
			<h3 class="page-title"> <?php echo $title; ?> <small><?php echo $en; ?></small></h3>
			<div class="page-bar">
				<ul class="page-breadcrumb">
					<li>
						<i class="fa fa-home"></i>
						<a href="/adminx">首页</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="#"><?php echo $title; ?></a>
					</li>
				</ul>
			</div>
			<!-- END PAGE HEADER-->
			<div class="clearfix"></div>
			<div class="row">
				<div class="col-md-4">
		              <iframe data-urlx="/" id="yl_main" src="/?shop_id=14" height="580" width="100%" style="border: 2px solid #000;"></iframe>
				</div>
				<div class="col-md-8">
					<div class="note note-success">
						<p>提示：栏目的设置可以参考如下菜单地址</p>
					</div>
					<div class="list-group">
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/'); ?>')">
								<i class="fa fa-home"></i>
								首页
								<?php echo site_url('/'); ?>
								</a>
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/article/lists'); ?>')">
								<i class="fa fa-book"></i>
								推荐阅读
								<?php echo site_url('/article/lists'); ?>
								</a>
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/shop/gm'); ?>')">
								<i class="fa fa-shopping-cart"></i>
								购物车
								<?php echo site_url('/shop/gm'); ?>
								</a>
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/shop/bill'); ?>')">
								<i class="fa fa-share-alt-square"></i>
								分销中心 
								<?php echo site_url('/shop/bill'); ?>
								</a>
								
							</div>
							<?php if($this->config->item('plug_mall')){ ?>
								<div class="note note-success" onclick="doyl('<?php echo site_url('/plug/mall/a'); ?>')">
						            <p>全部商品，权限地址：<?php echo site_url('/plug/mall/a'); ?></p>
					             </div>
					             <div class="note note-info" onclick="doyl('<?php echo site_url('/plug/mall/a/1'); ?>')">
						            <p>普通会员购买，权限地址：<?php echo site_url('/plug/mall/a/1'); ?></p>
					             </div>
					              <div class="note note-danger" onclick="doyl('<?php echo site_url('/plug/mall/a/2'); ?>')">
						            <p>仅微店店长购买，权限地址：<?php echo site_url('/plug/mall/a/2'); ?></p>
					             </div>
					              <div class="note">
						            <p>其他商城风格同理</p>
					             </div>
								
							<div class="list-group">
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/plug/mall/a'); ?>')">
								<i class="fa fa-ra"></i>
								商城风格一
								<?php echo site_url('/plug/mall/a'); ?>
								</a>
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/plug/mall/b'); ?>')">
								<i class="fa fa-life-ring"></i>
								商城风格二
								<?php echo site_url('/plug/mall/b'); ?>
								</a>
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/plug/mall/c'); ?>')">
								<i class="fa fa-bank"></i>
								商城风格三
								<?php echo site_url('/plug/mall/c'); ?>
								</a>
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/plug/mall/d'); ?>')">
								<i class="fa fa-fire"></i>
								商城风格四
								<?php echo site_url('/plug/mall/d'); ?>
								</a>
								<a href="javascript:;" class="list-group-item" onclick="doyl('<?php echo site_url('/plug/mall/e'); ?>')">
								<i class="fa fa-circle-thin"></i>
								商城风格五
								<?php echo site_url('/plug/mall/e'); ?>
								</a>
							</div>
							<?php } ?>
							<div class="portlet light">
						<div class="portlet-title tabbable-line">
							<div class="caption">
								<i class="icon-umbrella font-red-sunglo"></i>
								<span class="caption-subject font-red-sunglo bold uppercase">首页设置</span>
							</div>
						</div>
						<div class="portlet-body">
							<form method="post" id="index_up" name="index_up" novalidate="novalidate">
								<div class="form-group form-md-line-input">
									<input type="text" class="form-control" name="tj_sp" value="<?php echo $setting['tj_sp']; ?>">
									<label for="form_control_1">主推商品ID或主推内容的超链接</label>
								</div>
								<button data-dismiss="modal" type="button" class="btn default">
					                 <i class="fa fa-refresh"></i>
					               重置
				                </button>
								<button data-dismiss="modal" type="submit" class="btn default blue">
					                 <i class="fa fa-send"></i>
					               设置
				                </button>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	

	<!-- BEGIN QUICK SIDEBAR -->
	<?php $this -> load -> view('adminx/lt'); ?>
	<!-- END QUICK SIDEBAR -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<?php $this -> load -> view('adminx/footer'); ?>
<script>
	$(function() {
		var _url=window.location.hash.replace("#", "");
		if(_url){
			$("#yl_main").attr('src',_url);
		}
		up_form($("#index_up"), "/adminx/tj_sp", "修改首页配置", function(msg) {
			if (msg.type == 1) {
				$("#yl_main").attr('src','/');
				alert_ts('修改首页配置成功.');
			} else {
				alert_ts('修改首页配置失败.');
			}
		});
	}); 
	function doyl(_url){
		$("#yl_main").attr('src',_url);
	}
</script>